<?php
include_once ($_SERVER['DOCUMENT_ROOT'].'/global.php');
$array = array();
// $BeginTime = date('Y-m-d H:i:s',strtotime($_POST['BeginTime']));
// $EndTime = date('Y-m-d H:i:s',strtotime($_POST['EndTime']));
// $Minutes = floor((strtotime($EndTime)-strtotime($BeginTime))%86400/60);
$sql="Insert into BaoMing (XingMing,XueHao,IdNumber,BanJi,Phone,KeBiaoBlock,BeiZhu,ReferTime)
      values(
'{$_POST['XingMing']}',
'{$_POST['XueHao']}',
'{$_POST['IdNumber']}',
'{$_POST['BanJi']}',
'{$_POST['Phone']}',
'{$_POST['KeBiaoBlock']}',
'{$_POST['BeiZhu']}',
now()
)
on duplicate key
update
XingMing = '{$_POST['XingMing']}',
IdNumber = '{$_POST['IdNumber']}',
BanJi = '{$_POST['BanJi']}',
Phone = '{$_POST['Phone']}',
KeBiaoBlock = '{$_POST['KeBiaoBlock']}',
BeiZhu = '{$_POST['BeiZhu']}'
";
$mysqli->query($sql);
echo json_encode('1');
exit;
?>
